package org.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.example.domain.entity.Role;
import org.example.domain.entity.RoleMenu;
import org.example.mapper.RoleMenuMapper;
import org.example.service.RoleMenuService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


@Service
@RequiredArgsConstructor
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenu> implements RoleMenuService {


    private final RoleMenuMapper roleMenuMapper;

    @Override
    public List<RoleMenu> getMenusByRoleId(Integer id) {
        return roleMenuMapper.getMenusByRoleId(id);
    }

    @Override
    public void deleteByRoleId(Integer id) {
        roleMenuMapper.deleteByRoleId(id);
    }
}

